<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="js/vue.min.js" ></script>
	</head>
	<body>
		<div id="app">
			<p> {{ price | Yuan}} </p>
			
		</div>
	</body>
	<script type="text/javascript">
		// 定义全局过滤器
		
		Vue.filter("Yuan",function(val){
			if (val == '') {
				return
			}
			return val + "元"
		})
		
		var vm = new Vue({
			el:"#app",
			data:{
				price:99.99
			}
		})
		
	</script>
</html>
